import request from '@/utils/request'
import {projectApiUrl} from '../config'
/**
 * 获取施工进度周计划列表
 * @param parameter
 */
export function getWeekPlan(data){
  return request({
    url: projectApiUrl+'/construction/week-plan',
    method: 'get',
    params: data
  })
}



/**
 * 周计划提交审批
 * @param data
 */
export function weekPlanAudit(data){
  return request({
    url: projectApiUrl+'/construction/week-plan-confirm-audit',
    method: 'post',
    data: data
  })
}

/**
 * 新增施工进度周计划
 * @param data
 */
export function addWeekPlan(data){
  return request({
    url: projectApiUrl+'/construction/week-plan',
    method: 'post',
    data: data
  })
}

/**
 * 编辑项目类型
 * @param data
 */
export function editWeekPlan(planId){
  return request({
    url: projectApiUrl+'/construction/week-plan/'+planId,
    method: 'post',
    planId
  })
}


/**
 * 周计划列表统计
 * @param parameter
 */
export function getWeekPlanTotal(parameter){
  return request({
    url: '/mock/13/construction/week-plan/total',
    method: 'get',
    params: parameter
  })
}


/**
 * 周计划详情
 * @param parameter
 */
export function getWeekPlanDetails(id){
  return request({
    url: projectApiUrl+'/construction/week-plan/detail/'+id,
    method: 'get',
    id
  })
}
